from SyntaxDesc import *
import Register
gStyleGeneralFSDStructure= CharStyle(eFaceUnderline,rgb=(255,31,31))
gStyleFSDFunctionDefinition= CharStyle(eFaceBold,rgb=(255,20,220))
gStyleFSDVariableDeclaration= CharStyle(eFaceBold,rgb=(255,31,25))
gStyleFSDVariableDeclaration1= CharStyle(eFaceBold,rgb=(24,215,14))
gStyleFSDVariableDeclaration2= CharStyle(eFaceBold,rgb=(25,255,31))
gStyleFSDArgumentListDefinition= CharStyle(eFaceBold,rgb=(31,255,14))
gStyleFSDCommandDefinition1= CharStyle(eFacePlain,rgb=(30,25,255))
gStyleFSDCommandDefinition2= CharStyle(eFaceBold,rgb=(215,41,25))
gStyleFSDCommandDefinition3= CharStyle(eFacePlain,rgb=(255,41,25))
gStyleFSDTypeDefinition= CharStyle(eFaceBold,rgb=(106,95,255))
gStyleFSDGeometricSelection= CharStyle(rgb=(255,18,39))
gStyleFSDKeyboardInput= CharStyle(eFacePlain,rgb=(0,0,0))
gStyleFSDMenuDefinition1= CharStyle(eFaceBold,rgb=(255,35,31))
gStyleFSDMenuDefinition2= CharStyle(eFacePlain,rgb=(35,31,255))
gStyleFSDCatiaElements= CharStyle(eFaceItalic,rgb=(0,0,0))
gStyleFSDCustomCommand= CharStyle(eFaceUnderline,rgb=(15,120,120))
def Syntax():
	return SyntaxDesc(
		Words(gStyleGeneralFSDStructure,
			"SECTION1",
			"SECTION2",
			"SECTION3"
		),
		Words(gStyleFSDFunctionDefinition,
                        "HLPSET",
                        "ERRSET",
                        "FUNEX"
                ),
		Words(gStyleFSDVariableDeclaration,
                        "VARLEVEL",
                        "ENDVAR",
                        "IN",
                        "OUT",
                        "INOUT",
                ),
		Words(gStyleFSDVariableDeclaration1,
                        "DEFVAR",
                        "DIALOG_STD_OFF",
                        "PROMPT",
                        "UPROMPT",
                        "HELP"
                ),
		Words(gStyleFSDVariableDeclaration2,
                        "$ENDCOM", 
                        "ENDCOM"  
                ),
                Words(gStyleFSDCommandDefinition1,
                        "INT_CHGVIEW",
                        "ABS",
                        "GETVAL",
                        "MODVAL",
                        "TASK",
                        "TASKBACK",
                        "TASKNO",
                        "UNVAL",
                        "TASKVAL",
                        "ACCEPT",
                        "CMDEX"
                ),
                Words(gStyleFSDCommandDefinition2,
                        "IUACOM",
                        "INCLUDE",
                        "BY_CMD",
                        "COMMAND" 
                ),
                Words(gStyleFSDCommandDefinition3,
                        "INTLEVEL",
                        "KEEPLEVEL",
                        "OPTLEVEL",
                        "ENDOPT",
                        "RESUME" 
                ),

                Words(gStyleFSDTypeDefinition,
                        "LISTVAL",
                        "IND",
                        "DRAW",
                        "SPACE",
                        "INS",
                        "*EVENT",
                        "YES",
                        "PANEL",
                        "*STRI",
                        "*LIMSTRI",
                        "SEL",
                        "KEY",
                        "*STRC"
                ),

                Words(gStyleFSDGeometricSelection,
                        "NOHLIGHT",
                        "NOTEMP",
                        "NOOVLY",
                        "*ELEM",
                        "MSELC",
                        "MSELW",
                        "CHGVIEW",
                        "ALLVIEWS",
                        "DITTO"
                ),
               Words(gStyleFSDKeyboardInput,
                        "POSITION",
                        "NLS",
                        "OPTIONAL",
                        "*INT",
                        "*REAL",
                        "*CHAR",
                        "*TEXT",
                        "DEFAULT",
                        "FORMAT"
                ),
               Words(gStyleFSDMenuDefinition1,
                        "MENLEVEL",
                        "ENDMEN" 
                ),
               Words(gStyleFSDMenuDefinition2,
                        "ITEM"
                ),
               Words(gStyleFSDCatiaElements,
                        "*WSP",
                        "*WSP_MAS",
                        "*WSP_DR",
                        "*WSP_SP",
                        "*ELEM",
                        "*AXS",
                        "*CCV",
                        "*CIR",
                        "*CNP",
                        "*CRV",
                        "*CSTB",
                        "*CSTM",
                        "*DIT",
                        "*ELL",
                        "*FAC",
                        "*HYP",
                        "*LAW",
                        "*LIP",
                        "*LN",
                        "*NET",
                        "*OCP",
                        "*PAR",
                        "*PIP",
                        "*PLN",
                        "*POL",
                        "*PT",
                        "*SKI",
                        "*SOL",
                        "*STR",
                        "*SUR",
                        "*TRA",
                        "*VECT",
                        "*VOL",
                        "*ARWD",
                        "*AXSD",
                        "*CIRD",
                        "*CND",
                        "*CRVD",
                        "*DIM",
                        "*DIMN",
                        "*DITD",
                        "*ELLD",
                        "*GDLN",
                        "*GDPT",
                        "*HYPD",
                        "*LIS",
                        "*LND",
                        "*LST",
                        "*NUMD",
                        "*OCND",
                        "*PARD",
                        "*PTD",
                        "*SHAP",
                        "*STRD",
                        "*SYMB",
                        "*SYMD",
                        "*SYSD",
                        "*TRAD",
                        "*TXTD",
                        "*TXTN",
                        "*ROB",
                        "*TSK",
                        "*PCS",
                        "*CTL",
                        "*SET",
                        "*VU",
                        "*DRAFT",
                        "*BLK",
                        "*FAM",
                        "*BLK_NOD",
                        "*FAM_ELE",
                        "*SOL_FED",
                        "*POL_FED",
                        "*SOL_PRM",
                        "*POL_PRM",
                        "*SOL_FSU",
                        "*POL_FSU" 
                ),
               Words(gStyleFSDCustomCommand,
                        "OK_KCHEK",
                        "OK_BLK",
                        "BREAKING",
                        "OK_TCHEK",
                        "OK_TGEOM",
                        "CRE_DCV",
                        "DEF_SKET",
                        "YES_DEN",
                        "OK_ERASE",
                        "OK_ERAST",
                        "CD_ERASE",
                        "SKET_HGL",
                        "YES_ITER",
                        "LOOP_ERA",
                        "LOOP_SEL",
                        "YES_MOS",
                        "OK_UEMOD",
                        "YES_NTG",
                        "OK_PIT",
                        "YES_PRO",
                        "PRE_SELE",
                        "QUICK_VO",
                        "CRE_RIB",
                        "ZON_VAL",
                        "OK_TOUCH",
                        "SHIFTING",
                        "OK_SIP",
                        "CRE_SOL",
                        "OK_TIE",
                        "LOOP_TLO",
                        "CRE_UEL",
                        "OK_UEL",
                        "YES_UPD",
                        "BND_RIB1",
                        "BND_RIB2",
                        "YES_VOL",
                        "OK_CONCA",
                        "LISTELEM",
                        "LIST_MEL",
                        "ATT_SIP",
                        "CMO_SIP",
                        "DEC_SIP",
                        "SIP_SOL",
                        "PTD_SIP",
                        "VIS_SIP",
                        "LISTGEOM",
                        "LISTGECF",
                        "LISTGECR",
                        "TRACRV",
                        "SYMCRV",
                        "STDCRV",
                        "OFFCRV",
                        "RELCRV",
                        "EXTCRV",
                        "AFFCRV",
                        "INI_SKET"
                ),
		Words(gStyleFSDArgumentListDefinition,
                "=",">","<",
                ")","("),
		Regex(gStyleComment,'/.*'),
	)

Register.RegisterSyntax(Syntax,"FSD","FSD Include")
